<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>获取页面最后修改的时间</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.getenv.html">getenv</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.getmygid.html">getmygid</a></div>
 <div class="up"><a href="ref.info.html">PHP 选项/信息 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.getlastmod" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">getlastmod</h1>
  <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">getlastmod</span> &mdash; <span class="dc-title">获取页面最后修改的时间</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.getlastmod-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">int</span> <span class="methodname"><strong>getlastmod</strong></span>
    ( <span class="methodparam">void</span>
   )</div>

  <p class="para rdfs-comment">
   获取当前页面最后修改的时间。
  </p>
  <p class="para">
   如果你对其他文件的最后修改时间的感兴趣，可考虑使用 <span class="function"><a href="function.filemtime.html" class="function">filemtime()</a></span>。
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.getlastmod-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   返回当前页面最后修改的时间。这个值是一个 Unix 时间戳，可以传入 <span class="function"><a href="function.date.html" class="function">date()</a></span>。
   错误时返回 <strong><code>FALSE</code></strong>。
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.getlastmod-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-468">
    <p><strong>Example #1 <span class="function"><strong>getlastmod()</strong></span> 例子</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">//&nbsp;输出类似&nbsp;'Last&nbsp;modified:&nbsp;March&nbsp;04&nbsp;1998&nbsp;20:43:59.'<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"Last&nbsp;modified:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">date&nbsp;</span><span style="color: #007700">(</span><span style="color: #DD0000">"F&nbsp;d&nbsp;Y&nbsp;H:i:s."</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">getlastmod</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.getlastmod-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.date.html" class="function" rel="rdfs-seeAlso">date()</a> - 格式化一个本地时间／日期</span></li>
    <li class="member"><span class="function"><a href="function.getmyuid.html" class="function" rel="rdfs-seeAlso">getmyuid()</a> - 获取 PHP 脚本所有者的 UID</span></li>
    <li class="member"><span class="function"><a href="function.getmygid.html" class="function" rel="rdfs-seeAlso">getmygid()</a> - 获取当前 PHP 脚本拥有者的 GID</span></li>
    <li class="member"><span class="function"><a href="function.get-current-user.html" class="function" rel="rdfs-seeAlso">get_current_user()</a> - 获取当前 PHP 脚本所有者名称</span></li>
    <li class="member"><span class="function"><a href="function.getmyinode.html" class="function" rel="rdfs-seeAlso">getmyinode()</a> - 获取当前脚本的索引节点（inode）</span></li>
    <li class="member"><span class="function"><a href="function.getmypid.html" class="function" rel="rdfs-seeAlso">getmypid()</a> - 获取 PHP 进程的 ID</span></li>
    <li class="member"><span class="function"><a href="function.filemtime.html" class="function" rel="rdfs-seeAlso">filemtime()</a> - 取得文件修改时间</span></li>
   </ul>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.getenv.html">getenv</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.getmygid.html">getmygid</a></div>
 <div class="up"><a href="ref.info.html">PHP 选项/信息 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
